
package com.joolun.cloud.mall.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joolun.cloud.common.core.constant.CacheConstants;
import com.joolun.cloud.mall.common.entity.ThemeMobile;
import com.joolun.cloud.mall.admin.mapper.ThemeMobileMapper;
import com.joolun.cloud.mall.admin.service.ThemeMobileService;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * 移动端主题配置
 *
 * @author www.joolun.com
 * @date 2020-06-04 13:49:31
 */
@Service
public class ThemeMobileServiceImpl extends ServiceImpl<ThemeMobileMapper, ThemeMobile> implements ThemeMobileService {

	@Override
	@CacheEvict(value = CacheConstants.MALL_THEME_MOBILE_CACHE, allEntries = true)
	public boolean updateById(ThemeMobile entity) {
		baseMapper.updateById(entity);
		return Boolean.TRUE;
	}

	@Override
	@CacheEvict(value = CacheConstants.MALL_THEME_MOBILE_CACHE, allEntries = true)
	public boolean removeById(Serializable id) {
		baseMapper.deleteById(id);
		return Boolean.TRUE;
	}
}
